$(function(){
	//渲染文件上传功能
	layui.use('upload', function(){
		  layui.upload({
			  url: projectPath+'/file/file-upload'
			  ,type: "post"
			  ,title: '仅支持excel文件'
			  ,ext: 'xls|xlsx'
			  ,type: 'file'
			  ,success: function(res){
				  alert(res.message);
			   }
		}); 
	});
	//获取表格内容对象
	var domTableBody = $("#tableData > tbody");
	$.ajax({
		   type: "get",
		   url: projectPath+"/excel",
		   dataType: "json",
		   success: function(msg){
			   for(var i = 0;i<msg.data.length;i++){
				   var tr = domTableBody.append(
					   "<tr>" +
					   		"<th>"+msg.data[i].fileName+"</th>"   +
					   		"<th>"+msg.data[i].filePath+"</th>"   +
					   		"<th>"+msg.data[i].fileSize+"</th>"   +
					   		"<th>"+msg.data[i].uploadTime+"</th>" +
					   	"</tr>"
				    );
			   }
		   }
	});
})